//
//  MineDrawerController.m
//  TEXT—EVENT
//
//  Created by Amydom on 16/1/11.
//  Copyright © 2016年 Amydom. All rights reserved.
//

#import "MineDrawerController.h"

@interface MineDrawerController ()<UITableViewDataSource,UITableViewDelegate>

@property (nonatomic, strong)UITableView *myTableView;

@property (nonatomic, strong)UIView *headView;

@property (nonatomic, strong)UIImageView *imageView;


@end

@implementation MineDrawerController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.imageView = [[UIImageView alloc]initWithFrame:SCREEN];
    self.imageView.image = [UIImage imageNamed:@"1233.jpg"];
    [self.view addSubview:self.imageView];
    
    self.myTableView = [[UITableView alloc]initWithFrame:SCREEN style:UITableViewStylePlain];
    self.myTableView.backgroundColor = [UIColor colorWithRed:1.000 green:0.981 blue:0.897 alpha:1.000];
    self.myTableView.delegate = self;
    self.myTableView.dataSource = self;
    [self.view addSubview:self.myTableView];
    [self.myTableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
    self.myTableView.separatorStyle = UITableViewCellEditingStyleNone;

    self.headView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WITHE, 200)];
    self.headView.backgroundColor = [UIColor colorWithRed:0.643 green:0.620 blue:0.886 alpha:1.000];
    self.myTableView.tableHeaderView = self.headView;
    
    
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 9;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    cell.backgroundColor = [UIColor clearColor];
    
    NSArray *array = @[@"首页",@"专题",@"路线规划",@"music",@"redio"];
    for (int i = 0; i < array.count; i++) {
        

    cell.textLabel.text = [array objectAtIndex:i];
        NSLog(@"^^^%@",[array objectAtIndex:i]);
        NSLog(@"***%@",cell);
        

   
    }
    
   return cell;
    
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return 50;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
